﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FrienDev.BusinessRules;

public partial class Home_Track : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        object tracks;
        if (ApiHelper.Instance.IsFriendsPage())
        {
            //lblTitle.Text = "他的动态";
            tracks = TrackRules.Instance.GetTrackByUserId(ApiHelper.Instance.GetRequestUserId(), 50);
        }
        else
        {
            //lblTitle.Text = "好友动态";
            tracks = TrackRules.Instance.GetFriendsTrackByUserId(UserRules.Instance.GetCurrentUserId(), 50);
        }

        rptTrackList.DataSource = tracks;
        rptTrackList.DataBind();
    }
}
